#ifndef _CONNECTION_H
#define _CONNECTION_H



void conn_init(void);
void conn_exit(void);
struct connNode *hasConn(unsigned int sip, unsigned int dip, unsigned short sport, unsigned short dport);
struct connNode *addConn(unsigned int sip, unsigned int dip, unsigned short sport, unsigned short dport, u_int8_t proto);
unsigned short getNewNATPort(struct NATRecord rule);
int setConnNAT(struct connNode *node, struct NATRecord record, int natType) ;
int eraseConnRelated(struct IPRule rule);
void addConnExpires(struct connNode *node, unsigned int plus);
void* formAllConns(unsigned int *len);
#endif